]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
overviewControls: Remove message indicator
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 11 Feb 2015 16:23:30 +0000 (17:23 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 20 Feb 2015 16:40:21 +0000 (17:40 +0100)
The message tray is now empty and about to be removed, so an indication
at the bottom edge of the overview becomes an odd location to convey the
status of the summary. We will eventually display an indication in the
top bar that unseen messages are available, for now just remove the
existing indicator.

https://bugzilla.gnome.org/show_bug.cgi?id=744850

data/theme/gnome-shell-sass
js/ui/components/telepathyClient.js
js/ui/messageTray.js
js/ui/overview.js
js/ui/overviewControls.js

index 0ab8e7bbe03f010487a6619a3547c465bc79be91..58973633ce37d70ac361f4222f0497ffbf4048fb 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 0ab8e7bbe03f010487a6619a3547c465bc79be91
+Subproject commit 58973633ce37d70ac361f4222f0497ffbf4048fb
index 210360f35dd2213e1f10411f7ab1a622fb7f6d55..4a7ab670a5ff4a7d94c6e799d38d5a21c5214cf3 100644 (file)
@@ -639,10 +639,6 @@ const ChatSource = new Lang.Class({
         return this._pendingMessages.length;
     },
 
-    get indicatorCount() {
-        return this.count;
-    },
-
     get unseenCount() {
         return this.count;
     },
index 2e879fd94c72996232206b11d877564c239dd565..5443c78ec176b288fed8f181d1a1af7a1c8b96b6 100644 (file)
@@ -1255,11 +1255,6 @@ const Source = new Lang.Class({
         return this.notifications.length;
     },
 
-    get indicatorCount() {
-        let notifications = this.notifications.filter(function(n) { return !n.isTransient && !n.resident; });
-        return notifications.length;
-    },
-
     get unseenCount() {
         return this.notifications.filter(function(n) { return !n.acknowledged; }).length;
     },
index e21b4bb16fcacde43147c59213787f3196349041..d61ec29e7484ddce48a51a8a5d73bbf58a7200f6 100644 (file)
@@ -259,8 +259,6 @@ const Overview = new Lang.Class({
         this._overview.add(this._controls.actor, { y_fill: true, expand: true });
         this._controls.actor.connect('scroll-event', Lang.bind(this, this._onScrollEvent));
 
-        this._stack.add_actor(this._controls.indicatorActor);
-
         // TODO - recalculate everything when desktop size changes
         this.dashIconSize = this._dash.iconSize;
         this._dash.connect('icon-size-changed',
index 3eb0375f859371d5fc2acc22c0f2dffb06c839f1..617fc6d82235a18013daffa660335f4801966b5d 100644 (file)
@@ -391,108 +391,6 @@ const DashSpacer = new Lang.Class({
     }
 });
 
-const MessagesIndicator = new Lang.Class({
-    Name: 'MessagesIndicator',
-
-    _init: function(viewSelector) {
-        this._count = 0;
-        this._sources = [];
-        this._viewSelector = viewSelector;
-
-        this._container = new St.BoxLayout({ style_class: 'messages-indicator-contents',
-                                             reactive: true,
-                                             track_hover: true,
-                                             x_expand: true,
-                                             y_expand: true,
-                                             x_align: Clutter.ActorAlign.CENTER });
-
-        this._icon = new St.Icon({ icon_name: 'user-idle-symbolic',
-                                   icon_size: 16 });
-        this._container.add_actor(this._icon);
-
-        this._label = new St.Label();
-        this._container.add_actor(this._label);
-
-        this._highlight = new St.Widget({ style_class: 'messages-indicator-highlight',
-                                          x_expand: true,
-                                          y_expand: true,
-                                          y_align: Clutter.ActorAlign.END,
-                                          visible: false });
-
-        this._container.connect('notify::hover', Lang.bind(this,
-            function() {
-                this._highlight.visible = this._container.hover;
-            }));
-
-        let clickAction = new Clutter.ClickAction();
-        this._container.add_action(clickAction);
-        clickAction.connect('clicked', Lang.bind(this,
-            function() {
-                Main.messageTray.openTray();
-            }));
-
-        Main.messageTray.connect('showing', Lang.bind(this,
-            function() {
-                this._highlight.visible = false;
-                this._container.hover = false;
-            }));
-
-        let layout = new Clutter.BinLayout();
-        this.actor = new St.Widget({ layout_manager: layout,
-                                     style_class: 'messages-indicator',
-                                     y_expand: true,
-                                     y_align: Clutter.ActorAlign.END,
-                                     visible: false });
-        this.actor.add_actor(this._container);
-        this.actor.add_actor(this._highlight);
-
-        Main.messageTray.connect('source-added', Lang.bind(this, this._onSourceAdded));
-        Main.messageTray.connect('source-removed', Lang.bind(this, this._onSourceRemoved));
-
-        let sources = Main.messageTray.getSources();
-        sources.forEach(Lang.bind(this, function(source) { this._onSourceAdded(null, source); }));
-
-        this._viewSelector.connect('page-changed', Lang.bind(this, this._updateVisibility));
-        Main.overview.connect('showing', Lang.bind(this, this._updateVisibility));
-    },
-
-    _onSourceAdded: function(tray, source) {
-        source.connect('count-updated', Lang.bind(this, this._updateCount));
-        this._sources.push(source);
-        this._updateCount();
-    },
-
-    _onSourceRemoved: function(tray, source) {
-        this._sources.splice(this._sources.indexOf(source), 1);
-        this._updateCount();
-    },
-
-    _updateCount: function() {
-        let count = 0;
-        let hasChats = false;
-        this._sources.forEach(Lang.bind(this,
-            function(source) {
-                count += source.indicatorCount;
-                hasChats |= source.isChat;
-            }));
-
-        this._count = count;
-        this._label.text = ngettext("%d new message",
-                                    "%d new messages",
-                                   count).format(count);
-
-        this._icon.visible = hasChats;
-        this._updateVisibility();
-    },
-
-    _updateVisibility: function() {
-        let activePage = this._viewSelector.getActivePage();
-        let visible = ((this._count > 0) && (activePage == ViewSelector.ViewPage.WINDOWS));
-
-        this.actor.visible = visible;
-    }
-});
-
 const ControlsLayout = new Lang.Class({
     Name: 'ControlsLayout',
     Extends: Clutter.BinLayout,
@@ -521,9 +419,6 @@ const ControlsManager = new Lang.Class({
         this.viewSelector.connect('page-changed', Lang.bind(this, this._setVisibility));
         this.viewSelector.connect('page-empty', Lang.bind(this, this._onPageEmpty));
 
-        this._indicator = new MessagesIndicator(this.viewSelector);
-        this.indicatorActor = this._indicator.actor;
-
         let layout = new ControlsLayout();
         this.actor = new St.Widget({ layout_manager: layout,
                                      reactive: true,